package com.Exception.demo;

public class A02 {
    public static void main(String[] args) {
        int[] arr = null;
        getMax(arr);
    }

    public static int getMax(int[] arr) {
        if (arr == null) throw new NullPointerException();
        int max = arr[0];
        for (int i = 0; i < arr.length; i++) {
            if (max > arr[i]) max = arr[i];
        }
        return max;
    }
}
